D:\xampp\htdocs\tlty\public/../application/index\view\trip\trip_perice.html [ array (
) ]
[ info ] [ LOG ] INIT File

---------------------------------------------------------------
[ 2018-06-13T11:07:42+08:00 ] 127.0.0.1 127.0.0.1 GET /index/trip/trip_perice
[ log ] www.tlty.com/index/trip/trip_perice [运行时间：0.034002s][吞吐率：29.41req/s] [内存消耗：1,406.95kb] [文件加载：31]
[ info ] [ LANG ] D:\xampp\htdocs\tlty\thinkphp\lang\zh-cn.php
[ info ] [ ROUTE ] array (
  'type' => 'module',
  'module' => 
  array (
    0 => 'index',
    1 => 'trip',
    2 => 'trip_perice',
  ),
)
[ info ] [ HEADER ] array (
  'host' => 'www.tlty.com',
  'connection' => 'keep-alive',
  'pragma' => 'no-cache',
  'cache-control' => 'no-cache',
  'upgrade-insecure-requests' => '1',
  'user-agent' => 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Mobile Safari/537.36',
  'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  'accept-encoding' => 'gzip, deflate',
  'accept-language' => 'zh-CN,zh;q=0.9',
  'cookie' => 'PHPSESSID=moa6irgfc70uf1585viu23todv',
)
[ info ] [ PARAM ] array (
  '/index/trip/trip_perice' => '',
)
[ info ] [ RUN ] app\index\controller\Trip->trip_perice[ D:\xampp\htdocs\tlty\application\index\controller\Trip.php ]
[ info ] [ VIEW ] D:\xampp\htdocs\tlty\public/../application/index\view\trip\trip_perice.html [ array (
) ]
[ info ] [ LOG ] INIT File

---------------------------------------------------------------
[ 2018-06-13T11:07:42+08:00 ] 127.0.0.1 127.0.0.1 GET /index/trip/trip_perice
[ log ] www.tlty.com/index/trip/trip_perice [运行时间：0.033002s][吞吐率：30.30req/s] [内存消耗：1,406.95kb] [文件加载：31]
[ info ] [ LANG ] D:\xampp\htdocs\tlty\thinkphp\lang\zh-cn.php
[ info ] [ ROUTE ] array (
  'type' => 'module',
  'module' => 
  array (
    0 => 'index',
    1 => 'trip',
    2 => 'trip_perice',
  ),
)
[ info ] [ HEADER ] array (
  'host' => 'www.tlty.com',
  'connection' => 'keep-alive',
  'pragma' => 'no-cache',
  'cache-control' => 'no-cache',
  'upgrade-insecure-requests' => '1',
  'user-agent' => 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Mobile Safari/537.36',
  'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  'accept-encoding' => 'gzip, deflate',
  'accept-language' => 'zh-CN,zh;q=0.9',
  'cookie' => 'PHPSESSID=moa6irgfc70uf1585viu23todv',
)
[ info ] [ PARAM ] array (
  '/index/trip/trip_perice' => '',
)
[ info ] [ RUN ] app\index\controller\Trip->trip_perice[ D:\xampp\htdocs\tlty\application\index\controller\Trip.php ]
[ info ] [ VIEW ] D:\xampp\htdocs\tlty\public/../application/index\view\trip\trip_perice.html [ array (
) ]
[ info ] [ LOG ] INIT File

---------------------------------------------------------------
[ 2018-06-13T11:07:42+08:00 ] 127.0.0.1 127.0.0.1 GET /index/trip/trip_perice
[ log ] www.tlty.com/index/trip/trip_perice [运行时间：0.036002s][吞吐率：27.78req/s] [内存消耗：1,406.95kb] [文件加载：31]
[ info ] [ LANG ] D:\xampp\htdocs\tlty\thinkphp\lang\zh-cn.php
[ info ] [ ROUTE ] array (
  'type' => 'module',
  'module' => 
  array (
    0 => 'index',
    1 => 'trip',
    2 => 'trip_perice',
  ),
)
[ info ] [ HEADER ] array (
  'host' => 'www.tlty.com',
  'connection' => 'keep-alive',
  'pragma' => 'no-cache',
  'cache-control' => 'no-cache',
  'upgrade-insecure-requests' => '1',
  'user-agent' => 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Mobile Safari/537.36',
  'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  'accept-encoding' => 'gzip, deflate',
  'accept-language' => 'zh-CN,zh;q=0.9',
  'cookie' => 'PHPSESSID=moa6irgfc70uf1585viu23todv',
)
[ info ] [ PARAM ] array (
  '/index/trip/trip_perice' => '',
)
[ info ] [ RUN ] app\index\controlleULL,
  ),
)
[ info ] [ HEADER ] array (
  'host' => 'www.tlty.com',
  'connection' => 'keep-alive',
  'user-agent' => 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Mobile Safari/537.36',
  'upgrade-insecure-requests' => '1',
  'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  'referer' => 'http://www.tlty.com/index/trip/index/id/27.html',
  'accept-encoding' => 'gzip, deflate',
  'accept-language' => 'zh-CN,zh;q=0.9',
  'cookie' => 'PHPSESSID=moa6irgfc70uf1585viu23todv',
)
[ info ] [ PARAM ] array (
)
[ info ] [ RUN ] app\index\controller\Index->index[ D:\xampp\htdocs\tlty\application\index\controller\Index.php ]
[ info ] [ DB ] INIT mysql
[ info ] [ VIEW ] D:\xampp\htdocs\tlty\public/../application/index\view\index\index.html [ array (
  0 => 'tripCate',
  1 => 'bannerList',
  2 => 'tripRecom',
  3 => 'tripJp',
  4 => 'tripNew',
) ]
[ info ] [ SESSION ] INIT array (
  'id' => '',
  'var_session_id' => '',
  'prefix' => 'think',
  'type' => '',
  'auto_start' => true,
)
[ info ] [ LOG ] INIT File
[ sql ] [ DB ] CONNECT:[ UseTime:0.011001s ] mysql:dbname=lunhui_tp5;host=127.0.0.1;port=3306;charset=utf8
[ sql ] [ SQL ] SHOW COLUMNS FROM `think_trip_cate` [ RunTime:0.010001s ]
[ sql ] [ SQL ] SELECT * FROM `think_trip_cate` WHERE  `pid` = 0 [ RunTime:0.000000s ]
[ sql ] [ SQL ] SELECT * FROM `think_trip_cate` WHERE  `pid` = 1 [ RunTime:0.000000s ]
[ sql ] [ SQL ] SELECT * FROM `think_trip_cate` WHERE  `pid` = 2 [ RunTime:0.001000s ]
[ sql ] [ SQL ] SHOW COLUMNS FROM `think_banner` [ RunTime:0.009000s ]
[ sql ] [ SQL ] SELECT * FROM `think_banner` ORDER BY id desc [ RunTime:0.000000s ]
[ sql ] [ SQL ] SHOW COLUMNS FROM `think_trip` [ RunTime:0.010001s ]
[ sql ] [ SQL ] SELECT * FROM `think_trip` WHERE  `is_recom` = 1 ORDER BY create_time desc [ RunTime:0.001000s ]
[ sql ] [ SQL ] SELECT * FROM `think_trip` WHERE  `is_jp` = 1 ORDER BY create_time desc [ RunTime:0.001000s ]
[ sql ] [ SQL ] SELECT * FROM `think_trip` ORDER BY create_time desc LIMIT 3 [ RunTime:0.001000s ]

---------------------------------------------------------------
[ 2018-06-13T10:03:20+08:00 ] 127.0.0.1 127.0.0.1 GET /static/index/js/maps/swiper.min.js.map
[ log ] www.tlty.com/static/index/js/maps/swiper.min.js.map [运行时间：0.027002s][吞吐率：37.03req/s] [内存消耗：1,086.93kb] [文件加载：26]
[ info ] [ LANG ] D:\xampp\htdocs\tlty\thinkphp\lang\zh-cn.php
[ info ] [ ROUTE ] array (
  'type' => 'module',
  'module' => 
  array (
    0 => 'static',
    1 => 'index',
    2 => 'js',
  ),
)
[ info ] [ HEADER ] array (
  'host' => 'www.tlty.com',
  'connection' => 'keep-alive',
  'user-agent' => 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Mobile Safari/537.36',
  'accept-encoding' => 'gzip, deflate',
  'accept-language' => 'zh-CN,zh;q=0.9',
  'cookie' => 'PHPSESSID=moa6irgfc70uf1585viu23todv',
)
[ info ] [ PARAM ] array (
  '/static/index/js/maps/swiper_min_js_map' => '',
  'maps' => 'swiper.min.js.map',
)
[ info ] [ LOG ] INIT File

---------------------------------------------------------------
[ 2018-06-13T10:03:25+08:00 ] 127.0.0.1 127.0.0.1 GET /index/trip/index/id/68.html
[ log ] www.tlty.com/index/trip/index/id/68.html [运行时间：0.054003s][吞吐率：18.52req/s] [内存消耗：2,673.91kb] [文件加载：43]
[ info ] [ LANG ] D:\xampp\htdocs\tlty\thinkphp\lang\zh-cn.php
[ info ] [ ROUTE ] array (
  'type' => 'module',
  'module' => 
  array (
    0 => 'index',
    1 => 'trip',
    2 => 'index',
  ),
)
[ info ] [ HEADER ] array (
  'host' => 'www.tlty.com',
  'connection' => 'keep-alive',
  'upgrade-insecure-requests' => '1',
  'user-agent' => 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Mobile Safari/537.36',
  'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  'referer' => 'http://w<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
    <title>zx1984, Calendar-Price-jQuery</title>
    <link rel="stylesheet" href="__CSS__/calendar-price-jquery.min.css">
    <style>
        body {margin: 0; padding: 0; font-family: "Microsoft YaHei UI";}
    </style>
</head>
<body>

<div class="container"></div>

<script src="__JS__/jquery-1.12.4.min.js"></script>
<script src="__JS__/mock-data.js"></script>
<!--<script src="../dist/js/calendar-price-jquery.min.js"></script>-->
<script src="__JS__/calendar-price-jquery.js"></script>
<script>
    $(function () {
        // 生成模拟数据
        var MOCK_DATA = createMockData();

        // 日历设置表单字段配置
        // key 字段名
        // name 表单label
        // value 默认值
        // placeholder input[placeholder]
        var calendarConfig = [
//            {
//                key: 'buyNumMax',
//                name: '最多购买数',
//                type: 'number',
//                placeholder: '请输入最多购买数量'
//            },
//            {
//                key: 'buyNumMin',
//                name: '最少购买数',
//                type: 'number',
//                placeholder: '请输入最少购买数'
//            },
            {
                key: 'person_price',
                name: '成人售价',
                type: 'text',
                placeholder: '请输入'
            },
            {
                key: 'child_price',
                name: '儿童价格',
                type: 'text',
                placeholder: '请输入'
            }
//            {
//                key: 'priceSettlement',
//                name: '分销结算价',
//                type: 'text',
//                placeholder: '请输入'
//            },
//            {
//                key: 'priceRetail',
//                name: '建议零售价',
//                placeholder: '请输入建议零售价'
//            },
//            {
//                key: 'cashback',
//                name: '返现',
//                placeholder: '返现'
//            },
//            {
//                key: 'stock',
//                name: '当天库存',
//                type: 'number',
//                placeholder: '-1代表不限'
//            }
        ]

        // 日历中显示配置
        var showConfig = [
            {
                key: 'person_price',
                name: '￥'
            }
//            {
//                key: 'priceSettlement',
//                name: '采:￥'
//            },
//            {
//                key: 'stock',
//                name: '库:'
//            }
        ]

        // 样式颜色配置
        var styleConfig = {
            // 头部背景色
            headerBgColor: '#098cc2',
            // 头部文字颜色
            headerTextColor: '#fff',
            // 周一至周日背景色，及文字颜色
            weekBgColor: '#098cc2',
            weekTextColor: '#fff',
            // 周末背景色，及文字颜色
            weekendBgColor: '#098cc2',
            weekendTextColor: '#fff',
            // 有效日期颜色
            validDateTextColor: '#333',
            validDateBgColor: '#fff',
            validDateBorderColor: '#eee',
            // Hover
            validDateHoverBgColor: '#098cc2',
            validDateHoverTextColor: '#fff',
            // 无效日期颜色
            invalidDateTextColor: '#ccc',
            invalidDateBgColor: '#fff',
            invalidDateBorderColor: '#eee',
            // 底部背景颜色
            footerBgColor: '#fff',
            // 重置按钮颜色
            resetBtnBgColor: '#77c351',
            resetBtnTextColor: '#fff',
            resetBtnHoverBgColor: '#55b526',
            resetBtnHoverTextColor: '#fff',
            // 确定按钮
            confirmBtnBgColor: '#098cc2',
            confirmBtnTextColor: '#fff',
            confirmBtnHoverBgColor: '#00649a',
            confirmBtnHoverTextColor: '#fff',
            // 取消按钮
            cancelBtnBgColor: '#fff',
            cancelBtnBorderColor: '#bbb',
            cancelBtnTextColor: '#999',
            cancelBtnHoverBgColor: '#fff',
            cancelBtnHoverBorderColor: '#bbb',
            cancelBtnHoverTextColor: '#666'
        }

        // 初始化日历
        var zxCalendar = $.CalendarPrice({
            el: '.container',
            // startDate: '2017-08-02',
            endDate: '2019-02-20',
            data: MOCK_DATA,
            // 配置需要设置的字段名称
            config: calendarConfig,
            // 配置在日历中要显示的字段
            show: showConfig,
            // 自定义颜色
            style: styleConfig
        });

        log(zxCalendar)

        // 监听设置表单提交
        // 将阻止默认流程执行
        // 继续执行默认流程，请执行参数next()
        zxCalendar.$on('submit-form', function (data, next) {
            // data 设置的数据
            console.log('$(submit-form)表单数据 ================')
            console.log(data)


            // 此处可以验证表单
            // 验证表单逻辑....
            // ....

            // 继续执行下一步
            next()
        })

        // 执行过程中错误回调
        zxCalendar.$on('error', function (err) {
            // 执行中的错误提示
            console.error('$on(error)Error:')
            console.log(err)
            alert(err.msg);
        })

        // 切换月份
        zxCalendar.$on('month-change', function (data) {
            log('$on(month-change) 数据：');
            log(data);
        })

        // 点击有效的某一天通知
        zxCalendar.$on('valid-day', function (day, data, next) {
            log('$on(valid-day)当前点击的(有效)日期为: ' + day + ', 数据：');
            log(data);

            // 继续执行默认流程
            next();
        })

        // 设置数据变化
        zxCalendar.$on('setup-value-change', function (data) {
            log('$on(setup-value-change)设置窗口被修改数据....');
            log(data);
            // 取消设置
            // 这里可以触发关闭设置窗口
        })

        // 点击重置按钮回调
        zxCalendar.$on('reset', function () {
            log('$on(reset)数据重置成功！');
        })

        // 点击确定按钮回调，返回当前设置数据
        zxCalendar.$on('confirm', function (data) {
            log('$on(confirm)点击确定按钮通知！');
            log(data);
            alert(data)
            $.ajax({
                type: 'POST',
                url: "http://www.tlty.com/admin/calendar/add",
                data: {
                    name:data
                },
                success: function(data) {
                    alert(data)
                    console.log(data)

                },
                error:function(data){
                    alert('error')
                }
            });
        })

        // 点击取消按钮回调
        zxCalendar.$on('cancel', function () {
            log('$on(cancel)取消设置 ....');
            // 取消设置
            // 这里可以触发关闭设置窗口
        })

    });

    function log (s) {
        console.log(s)
    }
</script>

</body>
</html>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      